<!--
  @author heguanghua
  @since 2019/06/12 11:57
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head th:include="common/common::jscss"/>
<body>


<div class="layui-fluid">

    <blockquote class="layui-crumb">
        <a lay-href="/online/service/group/list.action">在线客服分组></a>
        <zmn>产品组</zmn>
    </blockquote>

    <div class="layui-card">
        <div th:replace="online/service/group/_tab::tab"></div>
        <div class="layui-card-body">
            <form method="POST" action="" class="layui-form" lay-filter="zmn-form">

                <input type="hidden" name="groupId" th:value="${groupId}"/>
                <input type="hidden" name="bizType" th:value="${bizType}"/>

                <div class="layui-tab layui-tab-brief" lay-filter="bizType">
                    <ul class="layui-tab-title">
                        <li th:each="bizTypeObj,state:${bizTypeList}" th:lay-id="${bizTypeObj.key}" th:class="${bizTypeObj.key == bizType ? 'layui-this' : ''}">
                            <a th:text="${bizTypeObj.value}" th:href="|/online/service/group/product/group/detail.action?groupId=${groupId}&bizType=${bizTypeObj.key}|"></a>
                        </li>
                    </ul>
                    <div class="layui-tab-content">
                        <div>
                            <div class="layui-card-body">
                                <div class="inline-block" style="float: left">
                                    <div class="zmn-2layer-list" th:each="productBusinessLine,state:${productBusinessLineList}">
                                        <div class="list-left" style="text-align: center">
                                            <div class="list-item" th:text="${productBusinessLine.name + '：'}"></div>
                                        </div>
                                        <div class="list-right">
                                            <div class="right-box">
                                                <div class="list-item">
                                                    <input type="checkbox" class="checkAll" lay-filter="checkAll" th:value="${bizType + '-' + productBusinessLine.relateId}" title="全选">
                                                </div>
                                                <div class="list-item" th:each="productGroup:${productGroupMap[productBusinessLine.relateId]}" th:title="${productGroup.name}">
                                                    <input type="checkbox" lay-filter="checkOne" name="productGroupId" th:class="${bizType + '-' + productBusinessLine.relateId}" th:value="|${bizType}-${productBusinessLine.relateId}-${productGroup.groupId}|"
                                                           th:checked="${#lists.contains(selectedProductGroupIdList, productGroup.groupId)}" th:title="${productGroup.name}">
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item submit">
                    <div class="layui-input-block" style="margin-left: 139px">
                        <button class="layui-btn" lay-submit="" lay-filter="zmn-form-submit">提交</button>
                        <button type="reset" class="layui-btn layui-btn-primary"
                                onclick="layui.admin.events.closeThisTabs();">取消
                        </button>
                    </div>
                </div>
            </form>

        </div>

    </div>

</div>
</body>
</html>

<script type="text/javascript" th:inline="javascript">

    var json = {
        groupId: [[${groupId}]],
        bizType: [[${bizType}]]
    };

    layui.config({
        base: "/static/lay/",
        version: 20200511
    }).extend({
        index: "lib/index",
        online_service_group_product_group_js: "online/service/group/product/group/zmn.plat.online.service.group.product.group.detail.edit",
    }).use(['index', 'online_service_group_product_group_js']);

</script>
